﻿#region Copyright Notice
// 
// 
//  
//  Copyright (c) 2009-2011 Anindya Chatterjee
//  
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//  
//      http://www.apache.org/licenses/LICENSE-2.0
//  
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
// 
// 
#endregion
using System;

namespace AbstractClass.Runtime.Caching
{
    /// <summary>
    /// Represents an entry in a <see cref="Cache&lt;TKey, TValue&gt;"/>.
    /// </summary>
    /// <typeparam name="TKey">The type of the key.</typeparam>
    /// <typeparam name="TValue">The type of the value.</typeparam>
    [Serializable]
    public class CacheEntry<TKey, TValue>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheEntry&lt;TKey, TValue&gt;"/> class.
        /// </summary>
        public CacheEntry()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CacheEntry&lt;TKey, TValue&gt;"/> class.
        /// </summary>
        /// <param name="key">The key associated with the entry.</param>
        /// <param name="value">The value.</param>
        public CacheEntry(TKey key, TValue value)
        {
            Key = key;
            Value = value;
        }

        /// <summary>
        /// Gets or sets the key.
        /// </summary>
        /// <value>The key.</value>
        public TKey Key { get; set; }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        public TValue Value { get; set; }
    }
}